Skip to content

fix: crash caused by uninitialized discrete vector ptrs on Windows#580

Merged
hnwyllmm merged 2 commits intomasterfrom
issue/2026041400115407624
Apr 21, 2026
Merged

fix: crash caused by uninitialized discrete vector ptrs on Windows#580
hnwyllmm merged 2 commits intomasterfrom
issue/2026041400115407624

Conversation

@LINxiansheng
Copy link
Copy Markdown
Member

Task Description

When ObExpr::init_vector is called for the VEC_DISCRETE format, it clears the null bitmap but leaves the ptrs and lens arrays uninitialized. For column-reference expressions where eval_vector is a no-op, downstream operators (such as sort and window function) read these stale pointers. This causes access violations on Windows, where freed memory is reclaimed more aggressively.

Solution Description

The fix zero-initializes the ptrs and lens arrays within init_vector when the format is VEC_DISCRETE.

Passed Regressions

Core test suite.

Upgrade Compatibility

No specific compatibility concerns noted.

Other Information

Release Note

Fixed an issue where uninitialized vector pointer/length arrays could cause access violations in downstream operators on Windows.

obdev and others added 2 commits April 21, 2026 07:31
@ob-robot ob-robot force-pushed the issue/2026041400115407624 branch from 2971f5a to 47c1ad6 Compare April 21, 2026 07:32
@hnwyllmm hnwyllmm merged commit 24ea18b into oceanbase:master Apr 21, 2026
6 checks passed
@hnwyllmm hnwyllmm deleted the issue/2026041400115407624 branch April 21, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants